(function (root, fn) {
  if (typeof root.define === 'function') {
    root.define(fn);
  } else {
    module.exports = fn();
  }
})(this, function () {
  let link = '115';
  return (function (linkage) {
    let factory;
    let version = 'V2';
    switch (linkage) {
      case '55':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '10.26.10.55',
          origin: 'http://10.26.10.55'
        };
        break;
      case 'csp':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '10.108.48.160',
          origin: 'http://10.108.48.160'
        };
        break;
      case '202':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '10.26.10.202',
          origin: 'http://10.26.10.202'
        };
        break;
      case '19180':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '36.110.36.118:19180',
          origin: 'http://36.110.36.118:19180'
        };
        break;
      case '11582':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '36.110.36.118:11582',
          origin: 'http://36.110.36.118:11582'
        };
        break;
      case '191':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '192.168.1.191',
          origin: 'http://192.168.1.191'
        };
        break;
      case '115':
        factory = {
          version: version,
          protocol: 'ws:',
          host: '192.168.1.115',
          origin: 'http://192.168.1.115'
        };
        break;
      default:
        throw new Error('请选择一个访问链接');
    }
    return factory;
  })(link);
});
